Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RTCIceCandidatePair interface in RTCIceTransport #205

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sam-vi
Copy link
Contributor

@sam-vi sam-vi commented Apr 18, 2024

Addresses: w3c/webrtc-pc#2930.

This change is built on top of w3c/webrtc-pc#2961, which converts RTCIceCandidatePair from a dictionary to an interface.

  • Change RTCIceCandidatePairEvent to contain a single RTCIceCandidatePair attribute.
  • Modify RTCIceTransport algo so that getSelectedCandidatePair() returns an item from [[CandidatePairs]].
  • Validate RTCIceCandidatePair inputs using object identity instead of candidate pair match algo.

Preview | Diff

Addresses: w3c/webrtc-pc#2930.

As an interface, RTCIceCandidatePair can be used as an attribute of
other interfaces.

So simplify RTCIceCandidatePairEvent by having a single candidatePair
attribute instead of individual local and remote candidates.
An application only acquires objects of RTCIceCandidatePair through
RTCIceTransport events and getSelectedCandidatePair().

So simplify input validation where RTCIceCandidatePair is used as an
argument by directly comparing object identity instead of using the
candidate pair match algorithm.
This ensures that each candidate pair has a unique identity, simplifying
the validation of RTCIceCandidatePair arguments to RTCIceTransport
methods.
@sam-vi
Copy link
Contributor Author

sam-vi commented Aug 6, 2024

Filed #217 to address the validation errors.

Probably best to merge #218 or fix #217 another way before proceeding with this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants